package com.wf.demo.job.dao;

import com.wf.demo.info.pojo.Device;
import com.wf.demo.job.pojo.DataDevice;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Auther: wf
 * @Date: 2019/11/25 16:51
 * @Description:
 */
public interface DataDeviceDAO extends JpaRepository<DataDevice,Long> {
    //单个设备的所有data
    Page<DataDevice> findByDevice(Device device, Pageable pageable);
    //
    Page<DataDevice> findAll(Pageable pageable);
    //
   List<DataDevice> findAllByDeviceAndCreateTimeBetween(Device device, LocalDateTime startTime,LocalDateTime endTime);
}
